package model.pojo;

import java.sql.ResultSet;

import models.util.MySqlDataAccessHelper;

public class AcLoaiTaiKhoanC2 {
	private String idloaitkc2;
	private String tenloaitkc2;
	private String idloaitkc1;
	private String ghichu;
	private AcLoaiTaiKhoanC1 infoLoaitkc1;
	
	public AcLoaiTaiKhoanC1 getInfoLoaitkc1() {
		MySqlDataAccessHelper mysql = new MySqlDataAccessHelper();
		try {
			mysql.open();
			String sql="select * from ac_loaitaikhoanc1 where ac_loaitaikhoanc1.IDLoaiTKC1='"+this.idloaitkc1+"'";
			ResultSet rs = mysql.executeQuery(sql);
			if(rs.next()){
				infoLoaitkc1=null;
				infoLoaitkc1.setIdloaitk(rs.getString("IDLoaiTKC1"));
				infoLoaitkc1.setTenloaitkc1(rs.getString("TenLoaiTKC1"));	
				infoLoaitkc1.setIdloaitk(rs.getString("IDLoaiTK"));
				infoLoaitkc1.setGhichu(rs.getString("GhiChu"));
			}
			rs.close();
		} catch (Exception e) {
			e.printStackTrace();
		}finally{
			mysql.close();
		}
		return infoLoaitkc1;
	}
	public void setInfoLoaitkc1(AcLoaiTaiKhoanC1 infoLoaitkc1) {
		this.infoLoaitkc1 = infoLoaitkc1;
	}
	public String getIdloaitkc2() {
		return idloaitkc2;
	}
	public void setIdloaitkc2(String idloaitkc2) {
		this.idloaitkc2 = idloaitkc2;
	}
	public String getTenloaitkc2() {
		return tenloaitkc2;
	}
	public void setTenloaitkc2(String tenloaitkc2) {
		this.tenloaitkc2 = tenloaitkc2;
	}
	public String getIdloaitkc1() {
		return idloaitkc1;
	}
	public void setIdloaitkc1(String idloaitkc1) {
		this.idloaitkc1 = idloaitkc1;
	}
	public String getGhichu() {
		return ghichu;
	}
	public void setGhichu(String ghichu) {
		this.ghichu = ghichu;
	}
	
	
}
